package xiao_jin.fantastic_journey.core.handler;

import club.someoneice.cookie.event.Event;
import net.fabricmc.api.EnvType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.tooltip.TooltipType;
import net.minecraft.text.Text;

import java.util.List;

/**
 * Fire in {@link EnvType#CLIENT}. <br />
 * This event will fire when items' tooltip was render.
 * */
public class ItemTooltipEvent extends Event {
    public final ItemStack item;
    public final List<Text> tooltip;
    public final Item.TooltipContext context;

    /**
     * @see Item#appendTooltip(ItemStack, Item.TooltipContext, List, TooltipType)
     *
     * @param item The item who will render the tooltip.
     * @param tooltip The tooltip item got.
     * @param context The context for tooltip. See { @link Item#appendTooltip }  }
     */
    public ItemTooltipEvent(ItemStack item, List<Text> tooltip, Item.TooltipContext context) {
        this.item = item;
        this.tooltip = tooltip;
        this.context = context;
    }
}
